/*************************************************************************
> File Name: queue.h
> Author: icebear
> Mail: 3322366195@qq.com
> Created Time: 2023-07-24 21:05:38
> Description: 基于链表的队列实现
************************************************************************/
#ifndef QUEUE_H
#define QUEUE_H
typedef struct DATA
{
    int value;
} Data;

typedef struct NODE
{
    struct NODE *next;
    Data *data;
} Node;

typedef struct QUEUE
{
    Node *front; // 队头
    Node *tail;  // 队尾
    int size;
} Queue;

Queue *create();
void destory(Queue *queue);
void push(Queue *queue, int item);
int pop(Queue *queue);
int peek(Queue *queue);
void clear(Queue *queue);
int isEmpty(Queue *queue);
int size(Queue *queue);
#endif